package com.aiwiown.face.request;

import com.aiwiown.face.ApiMethod;
import com.aiwiown.face.ApiObject;
import com.aiwiown.face.ApiRequest;
import com.aiwiown.face.internal.util.RequestParamUtils;
import com.aiwiown.face.response.RawValidateFrontFaceResponse;

import java.util.Map;

/**
 * <pre>
 *     验证上传用户自拍正脸照片，验证成功的正脸将保存在系统里。
 *
 * 仅当appkey有使用网页KYC验证API服务的自拍验证权限时，才可以调用此API，否则返回错误码 403（AUTHORIZATION_ERROR:Denied）。
 * https://faceid.com/pages/documents/7775665
 * </pre>
 * RawValidateFrontFaceRequest
 * Date: 2020/5/12 0012
 * Time: 14:06
 *
 * @author tang.xiaosheng@qq.com
 */
public class RawValidateFrontFaceRequest implements ApiRequest<RawValidateFrontFaceResponse> {

    private static String apiUrl = "/lite/raw/validate_front_face";

    private String bizContent;
    private ApiObject bizModel = null;

    @Override
    public ApiMethod getApiMethod() {
        return ApiMethod.POST;
    }

    @Override
    public String getApiUrl() {
        return apiUrl;
    }

    @Override
    public Map<String, String> getTextParams() throws IllegalAccessException {
        return RequestParamUtils.getTextParams(this.bizModel);
    }

    @Override
    public Map<String, byte[]> getByteArrayParams() throws IllegalAccessException {
        return RequestParamUtils.getByteArrayParams(this.bizModel);
    }

    @Override
    public String getApiVersion() {
        return null;
    }

    @Override
    public Class<RawValidateFrontFaceResponse> getResponseClass() {
        return RawValidateFrontFaceResponse.class;
    }

    @Override
    public String getBizContent() {
        return null;
    }

    public void setBizModel(ApiObject bizModel) {
        this.bizModel = bizModel;
    }

    @Override
    public String signVersion() {
        return null;
    }

    @Override
    public String getSignInfo(String apiKey, String secretKey) throws Exception {
        return null;
    }
}
